3.264 \(\int \frac {x^2 (c+d x^2)}{(a+b x^2)^2} \, dx\)

Optimal. Leaf size=67 \[ \frac {(b c-3 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}-\frac {x (b c-a d)}{2 b^2 \left (a+b x^2\right )}+\frac {d x}{b^2} \]

[Out]

d*x/b^2-1/2*(-a*d+b*c)*x/b^2/(b*x^2+a)+1/2*(-3*a*d+b*c)*arctan(x*b^(1/2)/a^(1/2))/b^(5/2)/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {455, 388, 205} \[ -\frac {x (b c-a d)}{2 b^2 \left (a+b x^2\right )}+\frac {(b c-3 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {d x}{b^2} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(c + d*x^2))/(a + b*x^2)^2,x]

[Out]

(d*x)/b^2 - ((b*c - a*d)*x)/(2*b^2*(a + b*x^2)) + ((b*c - 3*a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*Sqrt[a]*b^(5/
2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 455

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[(a + b*x^2)^(p + 1)*E
xpandToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)]
- (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[
m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rubi steps

\begin {align*} \int \frac {x^2 \left (c+d x^2\right )}{\left (a+b x^2\right )^2} \, dx &=-\frac {(b c-a d) x}{2 b^2 \left (a+b x^2\right )}-\frac {\int \frac {-b c+a d-2 b d x^2}{a+b x^2} \, dx}{2 b^2}\\ &=\frac {d x}{b^2}-\frac {(b c-a d) x}{2 b^2 \left (a+b x^2\right )}+\frac {(b c-3 a d) \int \frac {1}{a+b x^2} \, dx}{2 b^2}\\ &=\frac {d x}{b^2}-\frac {(b c-a d) x}{2 b^2 \left (a+b x^2\right )}+\frac {(b c-3 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 68, normalized size = 1.01 \[ -\frac {(3 a d-b c) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}-\frac {x (b c-a d)}{2 b^2 \left (a+b x^2\right )}+\frac {d x}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(c + d*x^2))/(a + b*x^2)^2,x]

[Out]

(d*x)/b^2 - ((b*c - a*d)*x)/(2*b^2*(a + b*x^2)) - ((-(b*c) + 3*a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*Sqrt[a]*b^
(5/2))

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 202, normalized size = 3.01 \[ \left [\frac {4 \, a b^{2} d x^{3} + {\left (a b c - 3 \, a^{2} d + {\left (b^{2} c - 3 \, a b d\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 2 \, {\left (a b^{2} c - 3 \, a^{2} b d\right )} x}{4 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}, \frac {2 \, a b^{2} d x^{3} + {\left (a b c - 3 \, a^{2} d + {\left (b^{2} c - 3 \, a b d\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - {\left (a b^{2} c - 3 \, a^{2} b d\right )} x}{2 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/4*(4*a*b^2*d*x^3 + (a*b*c - 3*a^2*d + (b^2*c - 3*a*b*d)*x^2)*sqrt(-a*b)*log((b*x^2 + 2*sqrt(-a*b)*x - a)/(b
*x^2 + a)) - 2*(a*b^2*c - 3*a^2*b*d)*x)/(a*b^4*x^2 + a^2*b^3), 1/2*(2*a*b^2*d*x^3 + (a*b*c - 3*a^2*d + (b^2*c
- 3*a*b*d)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) - (a*b^2*c - 3*a^2*b*d)*x)/(a*b^4*x^2 + a^2*b^3)]

________________________________________________________________________________________

giac [A]  time = 0.30, size = 58, normalized size = 0.87 \[ \frac {d x}{b^{2}} + \frac {{\left (b c - 3 \, a d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} - \frac {b c x - a d x}{2 \, {\left (b x^{2} + a\right )} b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a)^2,x, algorithm="giac")

[Out]

d*x/b^2 + 1/2*(b*c - 3*a*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) - 1/2*(b*c*x - a*d*x)/((b*x^2 + a)*b^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 82, normalized size = 1.22 \[ \frac {a d x}{2 \left (b \,x^{2}+a \right ) b^{2}}-\frac {3 a d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b^{2}}-\frac {c x}{2 \left (b \,x^{2}+a \right ) b}+\frac {c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {d x}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d*x^2+c)/(b*x^2+a)^2,x)

[Out]

d*x/b^2+1/2/b^2*x/(b*x^2+a)*a*d-1/2/(b*x^2+a)/b*c*x-3/2/b^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*a*d+1/2/(a*b
)^(1/2)/b*c*arctan(1/(a*b)^(1/2)*b*x)

________________________________________________________________________________________

maxima [A]  time = 2.32, size = 60, normalized size = 0.90 \[ -\frac {{\left (b c - a d\right )} x}{2 \, {\left (b^{3} x^{2} + a b^{2}\right )}} + \frac {d x}{b^{2}} + \frac {{\left (b c - 3 \, a d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(b*c - a*d)*x/(b^3*x^2 + a*b^2) + d*x/b^2 + 1/2*(b*c - 3*a*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2)

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 59, normalized size = 0.88 \[ \frac {x\,\left (\frac {a\,d}{2}-\frac {b\,c}{2}\right )}{b^3\,x^2+a\,b^2}+\frac {d\,x}{b^2}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (3\,a\,d-b\,c\right )}{2\,\sqrt {a}\,b^{5/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(c + d*x^2))/(a + b*x^2)^2,x)

[Out]

(x*((a*d)/2 - (b*c)/2))/(a*b^2 + b^3*x^2) + (d*x)/b^2 - (atan((b^(1/2)*x)/a^(1/2))*(3*a*d - b*c))/(2*a^(1/2)*b
^(5/2))

________________________________________________________________________________________

sympy [A]  time = 0.53, size = 114, normalized size = 1.70 \[ \frac {x \left (a d - b c\right )}{2 a b^{2} + 2 b^{3} x^{2}} + \frac {\sqrt {- \frac {1}{a b^{5}}} \left (3 a d - b c\right ) \log {\left (- a b^{2} \sqrt {- \frac {1}{a b^{5}}} + x \right )}}{4} - \frac {\sqrt {- \frac {1}{a b^{5}}} \left (3 a d - b c\right ) \log {\left (a b^{2} \sqrt {- \frac {1}{a b^{5}}} + x \right )}}{4} + \frac {d x}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d*x**2+c)/(b*x**2+a)**2,x)

[Out]

x*(a*d - b*c)/(2*a*b**2 + 2*b**3*x**2) + sqrt(-1/(a*b**5))*(3*a*d - b*c)*log(-a*b**2*sqrt(-1/(a*b**5)) + x)/4
- sqrt(-1/(a*b**5))*(3*a*d - b*c)*log(a*b**2*sqrt(-1/(a*b**5)) + x)/4 + d*x/b**2

________________________________________________________________________________________